<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>担保交友 - 精准筛选</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #2563eb;
            --primary-light: #60a5fa;
            --primary-dark: #1d4ed8;
            --secondary: #f97316;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --light-bg: #f8fafc;
            --card-bg: #ffffff;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --border-color: #e2e8f0;
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            --transition: all 0.25s ease;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--light-bg);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 65px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--card-bg);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            border-bottom: 1px solid var(--border-color);
            z-index: 1000;
        }
        
        .nav-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .nav-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
        }
        
        .nav-btn:hover {
            background-color: var(--light-bg);
            color: var(--primary);
        }
        
        /* 搜索区 */
        .search-container {
            padding: 12px 16px;
            background-color: var(--card-bg);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 56px;
            z-index: 900;
        }
        
        .search-box {
            position: relative;
            display: flex;
            gap: 8px;
        }
        
        .search-input {
            flex: 1;
            padding: 10px 16px 10px 40px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            background-color: var(--light-bg);
            font-size: 0.9rem;
        }
        
        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }
        
        .search-btn {
            padding: 0 16px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        /* 筛选面板 */
        .filters-panel {
            background-color: var(--card-bg);
            border-bottom: 1px solid var(--border-color);
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        
        .filters-header {
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
        }
        
        .filters-title {
            font-size: 0.95rem;
            font-weight: 600;
        }
        
        .toggle-filters {
            color: var(--primary);
            background: none;
            border: none;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .filter-groups {
            padding: 12px 16px;
        }
        
        .filter-group {
            margin-bottom: 16px;
        }
        
        .filter-group:last-child {
            margin-bottom: 0;
        }
        
        .filter-label {
            font-size: 0.9rem;
            font-weight: 500;
            margin-bottom: 8px;
            display: block;
        }
        
        /* 标签式筛选 */
        .filter-tags {
            display: flex;
            overflow-x: auto;
            gap: 8px;
            padding-bottom: 4px;
            margin-bottom: 12px;
        }
        
        .filter-tag {
            white-space: nowrap;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.85rem;
            background-color: var(--light-bg);
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            transition: var(--transition);
        }
        
        .filter-tag.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 范围筛选 */
        .range-slider {
            width: 100%;
            margin: 10px 0;
        }
        
        .range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        
        /* 多选筛选 */
        .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .checkbox-item input {
            width: 16px;
            height: 16px;
            accent-color: var(--primary);
        }
        
        .checkbox-item label {
            font-size: 0.85rem;
            margin: 0;
        }
        
        /* 筛选操作按钮 */
        .filter-actions {
            display: flex;
            gap: 10px;
            padding: 12px 16px;
            background-color: var(--light-bg);
            border-top: 1px solid var(--border-color);
        }
        
        .reset-filters {
            flex: 1;
            padding: 8px 0;
            background-color: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
            border-radius: 8px;
            font-size: 0.9rem;
        }
        
        .apply-filters {
            flex: 1;
            padding: 8px 0;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        /* 视图切换 */
        .view-controls {
            padding: 10px 16px;
            background-color: var(--card-bg);
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
        }
        
        .view-label {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        
        .view-options {
            display: flex;
            gap: 8px;
        }
        
        .view-btn {
            width: 34px;
            height: 34px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background-color: var(--light-bg);
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
        }
        
        .view-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 担保标识 */
        .verified-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: var(--success);
            font-size: 0.8rem;
            font-weight: 500;
            padding: 2px 6px;
            background-color: rgba(16, 185, 129, 0.1);
            border-radius: 4px;
        }
        
        /* 列表容器 */
        .people-list {
            padding: 12px;
        }
        
        .filter-results {
            padding: 10px 16px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            background-color: var(--card-bg);
            border-bottom: 1px solid var(--border-color);
        }
        
        /* 卡片视图 */
        .person-card {
            background-color: var(--card-bg);
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 12px;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }
        
        .person-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }
        
        /* 有图/无图样式 */
        .has-media .media-container {
            position: relative;
            height: 180px;
        }
        
        .no-media .media-container {
            height: 180px;
            background-color: var(--light-bg);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
        }
        
        .media-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(2, 1fr);
            height: 100%;
            gap: 2px;
        }
        
        .media-item {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .media-cover {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            opacity: 0;
            transition: var(--transition);
        }
        
        .media-container:hover .media-cover {
            opacity: 1;
        }
        
        .no-media-icon {
            font-size: 3rem;
            margin-bottom: 8px;
        }
        
        /* 资料信息区 */
        .profile-info {
            padding: 14px;
        }
        
        .profile-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
        }
        
        .user-main {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .user-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .user-details {
            min-width: 0;
        }
        
        .user-name {
            font-weight: 600;
            font-size: 1.05rem;
            margin-bottom: 2px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .user-meta {
            font-size: 0.8rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .connection-btn {
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
            background-color: var(--primary);
            color: white;
            border: none;
            transition: var(--transition);
        }
        
        .connection-btn:hover {
            background-color: var(--primary-dark);
        }
        
        .profile-body {
            margin-bottom: 12px;
        }
        
        .intro-text {
            font-size: 0.9rem;
            color: var(--text-primary);
            line-height: 1.4;
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .interests {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        
        .interest-tag {
            padding: 3px 10px;
            background-color: rgba(37, 99, 235, 0.1);
            color: var(--primary);
            border-radius: 12px;
            font-size: 0.75rem;
        }
        
        .profile-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        
        .trust-score {
            display: flex;
            align-items: center;
            gap: 4px;
            color: var(--secondary);
            font-weight: 500;
        }
        
        /* 列表视图 */
        .list-view .people-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .list-view .person-card {
            display: flex;
            height: 120px;
            padding: 10px;
        }
        
        .list-view .media-container {
            width: 100px;
            height: 100px;
            flex-shrink: 0;
        }
        
        .list-view .has-media .media-container {
            height: 100px;
        }
        
        .list-view .no-media .media-container {
            height: 100px;
        }
        
        .list-view .profile-info {
            flex: 1;
            padding: 0 10px;
            display: flex;
            flex-direction: column;
        }
        
        .list-view .intro-text,
        .list-view .interests {
            display: none;
        }
        
        .list-view .profile-footer {
            margin-top: auto;
        }
        
        /* 紧凑视图 */
        .compact-view .people-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
        
        .compact-view .media-container {
            height: 140px;
        }
        
        .compact-view .no-media .media-container {
            height: 140px;
        }
        
        .compact-view .profile-info {
            padding: 10px;
        }
        
        .compact-view .intro-text {
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 6px;
        }
        
        .compact-view .profile-footer {
            display: none;
        }
        
        .compact-view .connection-btn {
            width: 100%;
            padding: 5px 0;
            text-align: center;
            font-size: 0.8rem;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 65px;
            background-color: var(--card-bg);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-color);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            text-decoration: none;
        }
        
        .nav-item i {
            font-size: 1.25rem;
            margin-bottom: 4px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            top: 60px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            font-size: 0.9rem;
            z-index: 9999;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
        
        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            color: var(--text-secondary);
        }
        
        .empty-icon {
            font-size: 3rem;
            margin-bottom: 16px;
            color: var(--border-color);
        }
        
        .empty-text {
            margin-bottom: 20px;
        }
        
        .empty-action {
            padding: 8px 16px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-btn" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">担保交友</div>
        <button class="nav-btn" id="settingsBtn">
            <i class="fas fa-cog"></i>
        </button>
    </div>
    
    <!-- 搜索区 -->
    <div class="search-container">
        <div class="search-box">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索兴趣、标签或用户...">
            <button class="search-btn">搜索</button>
        </div>
    </div>
    
    <!-- 筛选面板 -->
    <div class="filters-panel" id="filtersPanel">
        <div class="filters-header">
            <div class="filters-title">高级筛选</div>
            <button class="toggle-filters" id="toggleFilters">
                <span>收起</span>
                <i class="fas fa-chevron-up"></i>
            </button>
        </div>
        
        <div class="filter-groups" id="filterGroups">
            <!-- 快速筛选标签 -->
            <div class="filter-group">
                <div class="filter-label">快速筛选</div>
                <div class="filter-tags">
                    <div class="filter-tag active">全部用户</div>
                    <div class="filter-tag">同城</div>
                    <div class="filter-tag">新用户</div>
                    <div class="filter-tag">已认证</div>
                    <div class="filter-tag">有共同兴趣</div>
                    <div class="filter-tag">年龄相仿</div>
                </div>
            </div>
            
            <!-- 性别筛选 -->
            <div class="filter-group">
                <div class="filter-label">性别</div>
                <div class="checkbox-group">
                    <div class="checkbox-item">
                        <input type="checkbox" id="gender-all" checked>
                        <label for="gender-all">全部</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="gender-male">
                        <label for="gender-male">男</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="gender-female">
                        <label for="gender-female">女</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="gender-other">
                        <label for="gender-other">其他</label>
                    </div>
                </div>
            </div>
            
            <!-- 年龄范围 -->
            <div class="filter-group">
                <div class="filter-label">年龄范围</div>
                <input type="range" min="18" max="60" value="30" class="range-slider" id="ageMinSlider">
                <div class="range-labels">
                    <span id="ageMinValue">18</span>
                    <span>至</span>
                    <span id="ageMaxValue">60</span>
                </div>
                <input type="range" min="18" max="80" value="60" class="range-slider" id="ageMaxSlider">
            </div>
            
            <!-- 距离范围 -->
            <div class="filter-group">
                <div class="filter-label">距离范围</div>
                <input type="range" min="1" max="50" value="20" class="range-slider" id="distanceSlider">
                <div class="range-labels">
                    <span>1公里</span>
                    <span id="distanceValue">20公里</span>
                    <span>50公里</span>
                </div>
            </div>
            
            <!-- 信任度筛选 -->
            <div class="filter-group">
                <div class="filter-label">信任度</div>
                <input type="range" min="70" max="100" value="90" class="range-slider" id="trustSlider">
                <div class="range-labels">
                    <span>70分</span>
                    <span id="trustValue">90分以上</span>
                    <span>100分</span>
                </div>
            </div>
            
            <!-- 照片筛选 -->
            <div class="filter-group">
                <div class="filter-label">照片设置</div>
                <div class="checkbox-group">
                    <div class="checkbox-item">
                        <input type="checkbox" id="photo-all" checked>
                        <label for="photo-all">全部用户</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="photo-with">
                        <label for="photo-with">有照片</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="photo-without">
                        <label for="photo-without">无照片</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="photo-multiple">
                        <label for="photo-multiple">多照片</label>
                    </div>
                </div>
            </div>
            
            <!-- 兴趣筛选 -->
            <div class="filter-group">
                <div class="filter-label">兴趣爱好</div>
                <div class="filter-tags">
                    <div class="filter-tag">全部</div>
                    <div class="filter-tag">运动</div>
                    <div class="filter-tag">音乐</div>
                    <div class="filter-tag">旅行</div>
                    <div class="filter-tag">美食</div>
                    <div class="filter-tag">阅读</div>
                    <div class="filter-tag">电影</div>
                    <div class="filter-tag">游戏</div>
                    <div class="filter-tag">摄影</div>
                    <div class="filter-tag">宠物</div>
                </div>
            </div>
        </div>
        
        <div class="filter-actions">
            <button class="reset-filters" id="resetFilters">重置筛选</button>
            <button class="apply-filters" id="applyFilters">应用筛选</button>
        </div>
    </div>
    
    <!-- 视图切换和结果统计 -->
    <div class="filter-results">找到 24 位符合条件的用户</div>
    
    <div class="view-controls">
        <div class="view-label">展示方式</div>
        <div class="view-options">
            <button class="view-btn active" data-view="card" title="卡片视图">
                <i class="fas fa-th-large"></i>
            </button>
            <button class="view-btn" data-view="list" title="列表视图">
                <i class="fas fa-list"></i>
            </button>
            <button class="view-btn" data-view="compact" title="紧凑视图">
                <i class="fas fa-th"></i>
            </button>
        </div>
    </div>
    
    <!-- 担保交友列表 -->
    <div class="people-list">
        <!-- 多图用户 -->
        <div class="person-card has-media">
            <div class="media-container">
                <div class="media-grid">
                    <img src="https://picsum.photos/id/64/300/300" alt="用户照片1" class="media-item">
                    <img src="https://picsum.photos/id/65/300/300" alt="用户照片2" class="media-item">
                    <img src="https://picsum.photos/id/66/300/300" alt="用户照片3" class="media-item">
                    <img src="https://picsum.photos/id/67/300/300" alt="用户照片4" class="media-item">
                    <img src="https://picsum.photos/id/68/300/300" alt="用户照片5" class="media-item">
                    <img src="https://picsum.photos/id/69/300/300" alt="用户照片6" class="media-item">
                </div>
                <div class="media-cover">
                    <i class="fas fa-images"></i> 查看全部6张照片
                </div>
            </div>
            
            <div class="profile-info">
                <div class="profile-header">
                    <div class="user-main">
                        <img src="https://picsum.photos/id/64/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-details">
                            <div class="user-name">
                                林小雨
                                <span class="verified-badge">
                                    <i class="fas fa-shield-alt"></i> 已担保
                                </span>
                            </div>
                            <div class="user-meta">
                                <span>26岁 · 女</span>
                                <span>·</span>
                                <span>3公里</span>
                            </div>
                        </div>
                    </div>
                    <button class="connection-btn">打招呼</button>
                </div>
                
                <div class="profile-body">
                    <p class="intro-text">喜欢摄影和旅行，周末经常去周边徒步，希望认识志同道合的朋友一起探索世界的美好。</p>
                    <div class="interests">
                        <span class="interest-tag">摄影</span>
                        <span class="interest-tag">旅行</span>
                        <span class="interest-tag">徒步</span>
                        <span class="interest-tag">美食</span>
                    </div>
                </div>
                
                <div class="profile-footer">
                    <div>活跃于 2小时前</div>
                    <div class="trust-score">
                        <i class="fas fa-star"></i> 信任度 98
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 单图用户 -->
        <div class="person-card has-media">
            <div class="media-container">
                <div class="media-grid">
                    <img src="https://picsum.photos/id/91/600/400" alt="用户照片" class="media-item" style="grid-column: span 3; grid-row: span 2;">
                </div>
                <div class="media-cover">
                    <i class="fas fa-image"></i> 查看照片
                </div>
            </div>
            
            <div class="profile-info">
                <div class="profile-header">
                    <div class="user-main">
                        <img src="https://picsum.photos/id/91/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-details">
                            <div class="user-name">
                                王大山
                                <span class="verified-badge">
                                    <i class="fas fa-shield-alt"></i> 已担保
                                </span>
                            </div>
                            <div class="user-meta">
                                <span>30岁 · 男</span>
                                <span>·</span>
                                <span>5.2公里</span>
                            </div>
                        </div>
                    </div>
                    <button class="connection-btn">打招呼</button>
                </div>
                
                <div class="profile-body">
                    <p class="intro-text">程序员，喜欢健身和看电影，偶尔玩玩吉他。希望认识有趣的朋友，一起交流学习。</p>
                    <div class="interests">
                        <span class="interest-tag">编程</span>
                        <span class="interest-tag">健身</span>
                        <span class="interest-tag">电影</span>
                        <span class="interest-tag">音乐</span>
                    </div>
                </div>
                
                <div class="profile-footer">
                    <div>活跃于 昨天</div>
                    <div class="trust-score">
                        <i class="fas fa-star"></i> 信任度 95
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 无图用户 -->
        <div class="person-card no-media">
            <div class="media-container">
                <div class="no-media-icon">
                    <i class="fas fa-user-circle"></i>
                </div>
                <div>未上传照片</div>
            </div>
            
            <div class="profile-info">
                <div class="profile-header">
                    <div class="user-main">
                        <img src="https://picsum.photos/id/237/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-details">
                            <div class="user-name">
                                陈思思
                                <span class="verified-badge">
                                    <i class="fas fa-shield-alt"></i> 已担保
                                </span>
                            </div>
                            <div class="user-meta">
                                <span>28岁 · 女</span>
                                <span>·</span>
                                <span>1.8公里</span>
                            </div>
                        </div>
                    </div>
                    <button class="connection-btn">打招呼</button>
                </div>
                
                <div class="profile-body">
                    <p class="intro-text">中学语文老师，喜欢阅读和写作，周末会去图书馆或参加读书会。希望认识爱读书的朋友。</p>
                    <div class="interests">
                        <span class="interest-tag">阅读</span>
                        <span class="interest-tag">写作</span>
                        <span class="interest-tag">教育</span>
                        <span class="interest-tag">历史</span>
                    </div>
                </div>
                
                <div class="profile-footer">
                    <div>活跃于 3小时前</div>
                    <div class="trust-score">
                        <i class="fas fa-star"></i> 信任度 99
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 两图用户 -->
        <div class="person-card has-media">
            <div class="media-container">
                <div class="media-grid">
                    <img src="https://picsum.photos/id/342/300/300" alt="用户照片1" class="media-item" style="grid-column: span 3;">
                    <img src="https://picsum.photos/id/349/300/300" alt="用户照片2" class="media-item" style="grid-column: span 3;">
                </div>
                <div class="media-cover">
                    <i class="fas fa-images"></i> 查看全部2张照片
                </div>
            </div>
            
            <div class="profile-info">
                <div class="profile-header">
                    <div class="user-main">
                        <img src="https://picsum.photos/id/342/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-details">
                            <div class="user-name">
                                刘阳
                                <span class="verified-badge">
                                    <i class="fas fa-shield-alt"></i> 已担保
                                </span>
                            </div>
                            <div class="user-meta">
                                <span>27岁 · 男</span>
                                <span>·</span>
                                <span>7.5公里</span>
                            </div>
                        </div>
                    </div>
                    <button class="connection-btn">打招呼</button>
                </div>
                
                <div class="profile-body">
                    <p class="intro-text">咖啡师，喜欢研究各种咖啡配方，业余时间喜欢骑行。希望认识喜欢咖啡和户外活动的朋友。</p>
                    <div class="interests">
                        <span class="interest-tag">咖啡</span>
                        <span class="interest-tag">骑行</span>
                        <span class="interest-tag">美食</span>
                        <span class="interest-tag">摄影</span>
                    </div>
                </div>
                
                <div class="profile-footer">
                    <div>活跃于 4小时前</div>
                    <div class="trust-score">
                        <i class="fas fa-star"></i> 信任度 96
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 无图用户 -->
        <div class="person-card no-media">
            <div class="media-container">
                <div class="no-media-icon">
                    <i class="fas fa-user-circle"></i>
                </div>
                <div>未上传照片</div>
            </div>
            
            <div class="profile-info">
                <div class="profile-header">
                    <div class="user-main">
                        <img src="https://picsum.photos/id/177/100/100" alt="用户头像" class="user-avatar">
                        <div class="user-details">
                            <div class="user-name">
                                张明
                                <span class="verified-badge">
                                    <i class="fas fa-shield-alt"></i> 已担保
                                </span>
                            </div>
                            <div class="user-meta">
                                <span>32岁 · 男</span>
                                <span>·</span>
                                <span>2.3公里</span>
                            </div>
                        </div>
                    </div>
                    <button class="connection-btn">打招呼</button>
                </div>
                
                <div class="profile-body">
                    <p class="intro-text">金融从业者，工作之余喜欢打篮球和看球赛，偶尔也会去听音乐会。希望拓展社交圈。</p>
                    <div class="interests">
                        <span class="interest-tag">篮球</span>
                        <span class="interest-tag">音乐</span>
                        <span class="interest-tag">金融</span>
                        <span class="interest-tag">旅行</span>
                    </div>
                </div>
                
                <div class="profile-footer">
                    <div>活跃于 今天上午</div>
                    <div class="trust-score">
                        <i class="fas fa-star"></i> 信任度 94
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-users"></i>
            <span>交友</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-plus-circle"></i>
            <span>发布</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-comment"></i>
            <span>消息</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-user"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- 提示消息 -->
    <div class="toast" id="toastMessage"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // DOM元素
        const backBtn = document.getElementById('backBtn');
        const settingsBtn = document.getElementById('settingsBtn');
        const toggleFiltersBtn = document.getElementById('toggleFilters');
        const filtersPanel = document.getElementById('filtersPanel');
        const filterGroups = document.getElementById('filterGroups');
        const viewBtns = document.querySelectorAll('.view-btn');
        const filterTags = document.querySelectorAll('.filter-tag');
        const connectionBtns = document.querySelectorAll('.connection-btn');
        const resetFiltersBtn = document.getElementById('resetFilters');
        const applyFiltersBtn = document.getElementById('applyFilters');
        const ageMinSlider = document.getElementById('ageMinSlider');
        const ageMaxSlider = document.getElementById('ageMaxSlider');
        const ageMinValue = document.getElementById('ageMinValue');
        const ageMaxValue = document.getElementById('ageMaxValue');
        const distanceSlider = document.getElementById('distanceSlider');
        const distanceValue = document.getElementById('distanceValue');
        const trustSlider = document.getElementById('trustSlider');
        const trustValue = document.getElementById('trustValue');
        const searchBtn = document.querySelector('.search-btn');
        const toastMessage = document.getElementById('toastMessage');
        
        // 筛选面板状态
        let filtersExpanded = true;
        
        // 初始化
        function init() {
            setupEventListeners();
            updateFilterValues();
        }
        
        // 设置事件监听
        function setupEventListeners() {
            // 返回按钮
            backBtn.addEventListener('click', () => {
                history.back();
                showToast('返回上一页');
            });
            
            // 设置按钮
            settingsBtn.addEventListener('click', () => {
                showToast('筛选设置');
            });
            
            // 切换筛选面板展开/收起
            toggleFiltersBtn.addEventListener('click', () => {
                filtersExpanded = !filtersExpanded;
                
                if (filtersExpanded) {
                    filterGroups.style.display = 'block';
                    toggleFiltersBtn.innerHTML = '<span>收起</span><i class="fas fa-chevron-up"></i>';
                } else {
                    filterGroups.style.display = 'none';
                    toggleFiltersBtn.innerHTML = '<span>展开</span><i class="fas fa-chevron-down"></i>';
                }
            });
            
            // 视图切换
            viewBtns.forEach(btn => {
                btn.addEventListener('click', () => {
                    const viewType = btn.getAttribute('data-view');
                    
                    viewBtns.forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    
                    // 移除所有视图类
                    document.body.classList.remove('list-view', 'compact-view');
                    
                    // 添加当前视图类
                    if (viewType === 'list') {
                        document.body.classList.add('list-view');
                    } else if (viewType === 'compact') {
                        document.body.classList.add('compact-view');
                    }
                    
                    showToast(`${btn.title}`);
                });
            });
            
            // 筛选标签切换
            filterTags.forEach(tag => {
                tag.addEventListener('click', function() {
                    // 找到同组的其他标签并移除active类
                    const siblings = Array.from(this.parentElement.children);
                    siblings.forEach(sib => sib.classList.remove('active'));
                    
                    // 为当前标签添加active类
                    this.classList.add('active');
                    
                    showToast(`已筛选: ${this.textContent}`);
                });
            });
            
            // 打招呼按钮
            connectionBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const userName = this.closest('.profile-info').querySelector('.user-name').textContent.trim();
                    showToast(`已向 ${userName} 打招呼`);
                    this.textContent = '已发送';
                    this.disabled = true;
                    this.style.opacity = '0.8';
                });
            });
            
            // 重置筛选
            resetFiltersBtn.addEventListener('click', () => {
                // 重置滑块
                ageMinSlider.value = 18;
                ageMaxSlider.value = 60;
                distanceSlider.value = 20;
                trustSlider.value = 90;
                
                // 重置复选框
                document.querySelectorAll('.checkbox-item input').forEach(checkbox => {
                    checkbox.checked = false;
                });
                document.getElementById('gender-all').checked = true;
                document.getElementById('photo-all').checked = true;
                
                // 重置标签
                document.querySelectorAll('.filter-tags .filter-tag').forEach((tag, index) => {
                    tag.classList.toggle('active', index === 0);
                });
                
                updateFilterValues();
                showToast('已重置所有筛选条件');
            });
            
            // 应用筛选
            applyFiltersBtn.addEventListener('click', () => {
                showToast('筛选条件已应用');
                // 在实际应用中，这里会根据筛选条件更新用户列表
            });
            
            // 年龄滑块
            ageMinSlider.addEventListener('input', () => {
                // 确保最小年龄不大于最大年龄
                if (parseInt(ageMinSlider.value) > parseInt(ageMaxSlider.value)) {
                    ageMaxSlider.value = ageMinSlider.value;
                }
                updateFilterValues();
            });
            
            ageMaxSlider.addEventListener('input', () => {
                // 确保最大年龄不小于最小年龄
                if (parseInt(ageMaxSlider.value) < parseInt(ageMinSlider.value)) {
                    ageMinSlider.value = ageMaxSlider.value;
                }
                updateFilterValues();
            });
            
            // 距离滑块
            distanceSlider.addEventListener('input', updateFilterValues);
            
            // 信任度滑块
            trustSlider.addEventListener('input', updateFilterValues);
            
            // 搜索按钮
            searchBtn.addEventListener('click', () => {
                const searchText = document.querySelector('.search-input').value.trim();
                if (searchText) {
                    showToast(`搜索: ${searchText}`);
                } else {
                    showToast('请输入搜索内容');
                }
            });
            
            // 照片筛选复选框逻辑
            const photoCheckboxes = document.querySelectorAll('#photo-all, #photo-with, #photo-without, #photo-multiple');
            photoCheckboxes.forEach(checkbox => {
                checkbox.addEventListener('change', function() {
                    if (this.id === 'photo-all') {
                        // 如果选中"全部用户"，取消其他选项
                        photoCheckboxes.forEach(cb => {
                            if (cb.id !== 'photo-all') cb.checked = false;
                        });
                    } else {
                        // 如果选中其他选项，取消"全部用户"
                        document.getElementById('photo-all').checked = false;
                    }
                });
            });
            
            // 性别筛选复选框逻辑
            const genderCheckboxes = document.querySelectorAll('#gender-all, #gender-male, #gender-female, #gender-other');
            genderCheckboxes.forEach(checkbox => {
                checkbox.addEventListener('change', function() {
                    if (this.id === 'gender-all') {
                        // 如果选中"全部"，取消其他选项
                        genderCheckboxes.forEach(cb => {
                            if (cb.id !== 'gender-all') cb.checked = false;
                        });
                    } else {
                        // 如果选中其他选项，取消"全部"
                        document.getElementById('gender-all').checked = false;
                    }
                });
            });
        }
        
        // 更新筛选器显示值
        function updateFilterValues() {
            ageMinValue.textContent = ageMinSlider.value;
            ageMaxValue.textContent = ageMaxSlider.value;
            distanceValue.textContent = `${distanceSlider.value}公里`;
            trustValue.textContent = `${trustSlider.value}分以上`;
        }
        
        // 显示提示消息
        function showToast(message) {
            toastMessage.textContent = message;
            toastMessage.classList.add('show');
            setTimeout(() => {
                toastMessage.classList.remove('show');
            }, 2000);
        }
        
        // 初始化页面
        document.addEventListener('DOMContentLoaded', init);
    </script>
</body>
</html>